package notInLeetcode;

import java.util.Arrays;
import java.util.Scanner;

/**
 * todo
 *
 * @author luolidong
 * @version 1.0
 * @create 2021-07-29 19:00
 */
public class CutShenZhi {
    public static int getSum(int[] nums, int mid) {
        int ans = 0;
        for (int i = 0; i < nums.length; i++) {
            ans += nums[i] / mid;
        }
        System.out.println(ans);
        return ans;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] split = scanner.nextLine().split(" ");
        int n = Integer.parseInt(split[0]);
        int k = Integer.parseInt(split[1]);
        String s = scanner.nextLine();
        String[] s1 = s.split(" ");

        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = Integer.parseInt(s1[i]);
        }
        Arrays.sort(nums);

        int l = 0;
        int r = n - 1;

        while (l < r) {
            //注意这里要+1
            int mid = (l + r + 1) / 2;
            if (getSum(nums, mid) >= k) {
                l = mid;
            } else {
                r = mid - 1;
            }
        }
        System.out.println(l);
        //暴力法
//        int j = 1;
//        while (true) {
//            int ans = 0;
//            for (int i = 0; i < s1.length; i++) {
//                ans += Integer.parseInt(s1[i]) / j;
//            }
//            if (ans < k) break;
//            j++;
//        }
//        System.out.println(j-1);

    }

}
